<?php

use think\migration\Migrator;

@set_time_limit(0);
@ini_set('memory_limit', -1);

/**
 * 站点自定义请求间隔
 */
class SiteRequestInterval extends Migrator
{
    public function change()
    {
        $this->site_add_request_interval_column();
    }

    private function site_add_request_interval_column()
    {
        $table = 'system_sites';

        $this->table($table)
             ->addColumn('request_interval', 'biginteger', ['limit' => 20, 'default' => 5, 'null' => true, 'comment' => '每次请求间隔(s))'])
             ->save();
    }
}
